package com.hzhr.iot.device.dao.mapper.custom;

import com.hzhr.iot.device.entity.CollectDeviceEntity;
import com.hzhr.iot.device.entity.IotDeviceEntity;
import com.hzhr.iot.device.entity.RegulatorCollectDataEntity;
import com.hzhr.iot.device.entity.ext.IotDeviceEntityExt;
import com.hzhr.iot.device.entity.ext.RegulatorCollectDataEntityExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PcRegulatorDeviceMonitorCollectDataMapper {


    //查询COLLECT_DEVICE对象regulator_1
    CollectDeviceEntity selectIdAndIsValid(@Param("id") Integer regulatorDeviceId);

    //查询调压设备的下的监控设备
    IotDeviceEntity selectIotCollectDeviceIdAndValid(@Param("CollectDeviceId") Integer CollectDeviceId, @Param("id") Integer monitorId);

    //查询监控设备的采集数据 RegulatorCollectDataEntityExt
    List<RegulatorCollectDataEntity>  selectRegulatorCollectDataAndIotDeviceidOrderByCollectTime(@Param("start") Integer start, @Param("count") Integer count,
                                                                               @Param("_greaterthanorequal_collectTime") String dateStr1, @Param("_lessthan_collectTime") String dateStr2,
                                                                               @Param("iotDeviceId") Integer IotDeviceId, @Param("orderBy_collectTime") String orderBy_collectTime);


    //查询REGULATOR_COLLECT_DATA对象总数
    int selectCountRegulatorCollectDataAndIotDeviceid( @Param("_greaterthanorequal_collectTime") String dateStr1, @Param("_lessthan_collectTime") String dateStr2,
                                                       @Param("iotDeviceId") Integer IotDeviceId);





}
